﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DongFangGuoKai.WMSPlatform.Core.Migrations
{
    public partial class M9 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "Code",
                table: "SpreadWalls",
                newName: "CellCode");

            migrationBuilder.AddColumn<string>(
                name: "TagIndex",
                table: "t_StackingStorage",
                type: "nvarchar(200)",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AddColumn<string>(
                name: "LogicalPartCode",
                table: "t_Pallet",
                type: "nvarchar(100)",
                nullable: false,
                defaultValue: "");

            migrationBuilder.AlterColumn<int>(
                name: "Group",
                table: "SpreadWalls",
                type: "int",
                nullable: true,
                oldClrType: typeof(int),
                oldType: "int");

            migrationBuilder.AddColumn<int>(
                name: "CellId",
                table: "SpreadWalls",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "TagIndex",
                table: "t_StackingStorage");

            migrationBuilder.DropColumn(
                name: "LogicalPartCode",
                table: "t_Pallet");

            migrationBuilder.DropColumn(
                name: "CellId",
                table: "SpreadWalls");

            migrationBuilder.RenameColumn(
                name: "CellCode",
                table: "SpreadWalls",
                newName: "Code");

            migrationBuilder.AlterColumn<int>(
                name: "Group",
                table: "SpreadWalls",
                type: "int",
                nullable: false,
                defaultValue: 0,
                oldClrType: typeof(int),
                oldType: "int",
                oldNullable: true);
        }
    }
}
